package com.bjian.CodeSandBox.codeSandbox.impl;

import cn.hutool.core.io.FileUtil;
import com.bjian.CodeSandBox.codeSandbox.CodeSandBoxTemplate;

import java.io.File;

public class ExampleCodeSandboxImpl extends CodeSandBoxTemplate {

    @Override
    public boolean cleanRunFile(File userCodeFile){

        boolean del = true;
        if (userCodeFile.getParentFile() != null) {
//            System.out.println(userCodeFile.getParent());
                del = FileUtil.del(userCodeFile.getParent());
                System.out.println("删除" + (del ? "成功" : "失败"));
        }
        return del;
    }

}
